# Process the password files first
#-------------------------------------
#set my_tmpsecret=`gpg -o ~/.secret/.tmp -d ~/.secret/.passwd.gpg`
#set my_gpass=`awk '/GMail:/ {print $2}' ~/.secret/.tmp`
#set my_del=`rm -f ~/.secret/.tmp`

set imap_user = "ricemark20@gmail.com"
set imap_pass =$my_gpass
set smtp_url = "smtp://ricemark20@smtp.gmail.com:587/"
set smtp_pass =$my_gpass
set from = "ricemark20@gmail.com"
set realname = "Mark Rice"
set folder = "imaps://imap.gmail.com:993"
set spoolfile = "+INBOX"
set postponed="+[Gmail]/Drafts"
mailboxes ="INBOX" ="Careers" ="Freecycle"
set imap_check_subscribed
set pager_stop

folder-hook . 'exec last-entry'
folder-hook . 'unset trash'
folder-hook . 'set trash="imaps://imap.gmail.com:993/[Gmail]/Trash"'
#folder-hook     'imaps://.*imap.gmail.com'                     unset record

bind editor <space> noop

macro index,pager d "<save-message>=[Gmail]/Trash<enter>"    "mark message as Trash"
macro index,pager H "<save-message>=INBOX<enter>"    "move message to Inbox"
macro index gi "<change-folder>=INBOX<enter>" "Go to inbox"
macro index ga "<change-folder>=[Gmail]/All Mail<enter>" "Go to all mail"
macro index gs "<change-folder>=[Gmail]/Sent Mail<enter>" "Go to Sent Mail"
macro index gd "<change-folder>=[Gmail]/Drafts<enter>" "Go to drafts"

set header_cache=~/.mutt/cache/headers
set query_command="abook --mutt-query '%s'"
macro index A “abook --add-email-query” 
macro index,pager A "<pipe-message>abook --add-email-quiet<return>" "add the sender address to abook"
set message_cachedir=~/.mutt/cache/bodies
set certificate_file=~/.mutt/certificates
#set record="~/.mutt/sent_mail"
#set record="=Sent"
set markers=no      # In the pager, don't display + at the beginning of wrapped lines
set move = no
set editor="vim -c \"set spell spelllang=en\""

source ~/.mutt/aliases

set mailcap_path = ~/.mailcap
auto_view text/html
macro pager \cb <pipe-entry>'urlview'<enter> 'Follow links with urlview'

#Colors
color status white blue
color index cyan default ~N  # new
color index red default ~D  # deleted
color index brightmagenta default ~T  # tagged
color index brightyellow default ~F  # flagged
color header green default "^Subject:"
color header yellow default "^Date:"
color header yellow default "^To:"
color header yellow default "^Cc:"
color header yellow default "^Bcc:"
color header yellow default "^From:"
color header red default "^X-.*:"

# reading mail
set timeout=10  
set mail_check=5
set sort=threads
set sort_aux=date
set move=no     
set mark_old=no
set beep_new

